﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="UI/API/1.7/Draggable" />
		<title>UI/API/1.7/Draggable - jQuery JavaScript Library</title>
		<link rel="stylesheet" href="style/reset.css" type="text/css" />
		<link rel="stylesheet" href="style/screen.css" type="text/css" />
		<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://www.winswd.com/aboutme/jquery/ui/style/main.css?9"; /*]]>*/</style>

		<link rel="stylesheet" type="text/css" href="style/jquery.tabs.css" />
		<!--[if lte IE 7]>
		<link rel="stylesheet" href="style/jquery.tabs-ie.css" type="text/css" media="projection, screen"/>
		<![endif]-->

		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script src="js/jquery.tabs.js"></script>

		<script>$(function(){
			$("div[id=examples]").each(function(){
				$(this).siblings("div:first").find("div.desc").after(
					$(this).find("div.example:has(#demo):first").remove().clone());

				if ( !$("div.example", this).length )
					$(this).remove();
			});

			$("div.entry")
				.children("p").remove().end()
				.find("ul:first li").each(function(){
					if ( !$(this).parent().siblings( $("a",this).attr("href") ).length )
						$(this).remove();
				}).end()
				.not(".ui")
				.tabs();

			$("div.args > br").remove();

			$("div.example")
				.children("p").remove().end()
				.tabs();

			var keywords = "String,Number,Object,Options,Array,Function,Callback,Selector,Event,Element,Integer,Float,Boolean".split(",");

			$("td.default span, td.type").each(function(){
				var html = this.innerHTML;
				jQuery.each(keywords, function(i,key){
					html = html.replace(new RegExp(key, "ig"), "<a href='/Types#" + key + "'>" + key + "</a>");
				});
				this.innerHTML = html;
			});

			$("div[id=source]").each(function(){
				var source = $("pre", this).html()
					.replace(/<\/?a.*?>/ig, "")
					.replace(/<\/?strong.*?>/ig, "")
					.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");

				//var items = [];
				//source = source.replace(/\s*<(link|script).*?>\s\*/g, function(m){
					//items.push(m);
					//return "";
				//}).replace("</head>", items.join("") + "</head>")
				//*/

				var iframe = document.createElement("iframe");
				iframe.src = "";
				iframe.width = "100%";
				iframe.height = $(this).prev().attr("rel") || "125";
				iframe.style.border = "none";
				$(this).prev().append(iframe);


				$(window).load(function(){
					var doc = iframe.contentDocument || iframe.contentWindow.document;
					source = source
						// IE needs to wait for the script to load (?)
						.replace("$(document).ready(function(){", "window.onload = (function(){try{")
						.replace(/}\);\s*<\/sc/, "}catch(e){}});</sc")
						//.replace("http://code.jquery.com/jquery-latest.js", "http://code.jquery.com/jquery-1.3rc2.js")
						.replace("</head>", "<style>html,body{border:0; margin:0; padding:0;}</style></head>");
					doc.open();
					doc.write( source );
					doc.close();
				});

			});
		});</script>
		<script type="text/javascript" src="js/custom.js"></script>
		<!--[if lt IE 5.5000]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE50Fixes.css";</style><![endif]-->
		<!--[if IE 5.5000]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE55Fixes.css";</style><![endif]-->
		<!--[if IE 6]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE60Fixes.css";</style><![endif]-->
		<!--[if IE 7]><style type="text/css">@import "http://www.winswd.com/aboutme/jquery/ui/style/IE70Fixes.css?1";</style><![endif]-->
		<!--[if lt IE 7]><script type="text/javascript" src="http://www.winswd.com/aboutme/jquery/ui/style/IEFixes.js"></script>
		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
		
		<!-- Head Scripts -->
			</head>
	<body id="jq-interior"  class="mediawiki ns-0 ltr">


<!-- Copyright � 2005. Spidersoft Ltd -->
<style>
A.applink:hover {border: 2px dotted #DCE6F4;padding:2px;background-color:#ffff00;color:green;text-decoration:none}
A.applink       {border: 2px dotted #DCE6F4;padding:2px;color:#2F5BFF;background:transparent;text-decoration:none}
A.info          {color:#2F5BFF;background:transparent;text-decoration:none}
A.info:hover    {color:green;background:transparent;text-decoration:underline}
</style>




	<div id="jq-siteContain">
			<div id="jq-content" class="jq-clearfix">

				<div id="jq-interiorNavigation">
					<div class='jq-portlet' id='jq-p-Getting-Started'>
						<h5></h5>
						<div class='jq-pBody'>
							<ul>
								<li id="jq-ui-doc-n-Draggable"><a href="Draggable.html">Draggable</a></li>
								<li id="jq-ui-doc-n-Droppable"><a href="Droppable.html">Droppable</a></li>				
								<li id="jq-ui-doc-n-Resizable"><a href="Resizable.html">Resizable</a></li>
								<li id="jq-ui-doc-n-Selectable"><a href="Selectable.html">Selectable</a></li>
								<li id="jq-ui-doc-n-Sortable"><a href="Sortable.html">Sortable</a></li>
							</ul>				
						</div>
					</div>
						<div class='jq-portlet' id='jq-p-API-Reference'>
						<h5>部件</h5>
						<div class='jq-pBody'>
							<ul>
								<li id="jq-ui-doc-n-Accordion"><a href="Accordion.html">Accordion</a></li>
								<li id="jq-ui-doc-n-Datepicker"><a href="Datepicker.html">Datepicker</a></li>				
								<li id="jq-ui-doc-n-Dialog"><a href="Dialog.html">Dialog</a></li>
								<li id="jq-ui-doc-n-Progressbar"><a href="Progressbar.html">Progressbar</a></li>
								<li id="jq-ui-doc-n-Slider"><a href="Slider.html">Slider</a></li>
								<li id="jq-ui-doc-n-Tabs"><a href="Tabs.html">Tabs</a></li>
							</ul>
						</div>
					</div>
						<div class='jq-portlet' id='jq-p-Plugins'>
				
						<h5>动画</h5>
						<div class='jq-pBody'>
							<ul>
								<li id="jq-ui-doc-n-AddClass"><a href="AddClass.html">AddClass</a></li>
								<li id="jq-ui-doc-n-RemoveClass"><a href="RemoveClass.html">RemoveClass</a></li>
                                <li id="jq-ui-doc-n-Animate"><a href="Animate.html">Animate</a></li>
                                <li id="jq-ui-doc-n-Effect"><a href="Effect.html">Effect</a></li>
                                <li id="jq-ui-doc-n-Hide"><a href="Hide.html">Hide</a></li>
                                <li id="jq-ui-doc-n-Show"><a href="Show.html">Show</a></li>
                                <li id="jq-ui-doc-n-SwitchClass"><a href="SwitchClass.html">SwitchClass</a></li>
                                <li id="jq-ui-doc-n-Toggle"><a href="Toggle.html">Toggle</a></li>
                                <li id="jq-ui-doc-n-ToggleClass"><a href="ToggleClass.html">ToggleClass</a></li>
							</ul>
						</div>				
					</div>					
				</div><!-- /#interiorNavigation -->

				<div id="jq-primaryContent">
		<div id="column-content">
	<div id="docs-content">
		<a name="top" id="top"></a>
				<h1 class="firstHeading">UI/API/1.7/Droppable</h1>
		<div id="bodyContent">
<!-- start content -->



<ul class="UIAPIPlugin-toc">
<li><a href="#overview">概述</a></li>
<li><a href="#options">参数</a></li>
<li><a href="#events">事件</a></li>
<li><a href="#methods">方法</a></li>
<li><a href="#theming">主题</a></li>
</ul>
<div class="UIAPIPlugin">
  <h1>jQuery UI Droppable</h1>
  <div id="overview">
    <h2 class="top-header">概述</h2>
    <div id="overview-main">
        <p>jQuery UI Droppable 插件可以填充被选择的元素(通过拖动进行填充). 你可以指定哪些draggable可以被允许填充.</p>
<p>所有的回调函数接受两个参数: 浏览器事件和ui对象, 此对象请查看下面的文档 :</p>
<ul>
 <li> <b>ui.draggable</b> - 当前拖动的draggable对象,jQuery对象.</li>
 <li> <b>ui.helper</b> - 当前拖动的辅助元素,jQuery对象.</li>
 <li> <b>ui.position</b> - 当前拖动的辅助元素的位置 { top: , left: }</li>
 <li> <b>ui.offset</b> - 当前拖动的辅助元素的绝对位置 { top: , left: }</li>
</ul>
    </div>
    <div id="overview-dependencies">
        <h3>其他附加文件</h3>
        <ul>
<li>UI Core</li>
<li><a href="http://docs.jquery.com/UI/Draggable" title="UI/Draggable">UI Draggable</a></li>
</ul>
    </div>
    <div id="overview-example">
        <h3>示例</h3>
        <div id="overview-example" class="example">
<ul><li><a href="#demo"><span>代码示范</span></a></li><li><a href="#source"><span>查看源文件</span></a></li></ul>
<p><div id="demo" class="tabs-container" rel="100">
创建div droppable (一个可以填充draggable的对象).<br />
</p>
<pre>$(&quot;#draggable&quot;).draggable();
    $(&quot;#droppable&quot;).droppable({
      drop: function() { alert('dropped'); }
    });
</pre>
<p></div><div id="source" class="tabs-container">
</p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;link type=&quot;text/css&quot; href=&quot;themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.min.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;ui/ui.core.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;ui/ui.droppable.js&quot;&gt;&lt;/script&gt;
  &lt;style type=&quot;text/css&quot;&gt;
    #draggable { width: 75px; height: 25px; background: silver; padding: 10px; }
    #droppable { position: absolute; left: 250px; top: 0; width: 125px; height: 75px; background: gray; color: white; padding: 10px; }
  &lt;/style&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
    $(&quot;#draggable&quot;).draggable();
    $(&quot;#droppable&quot;).droppable({
      drop: function() { alert('dropped'); }
    });
  });
  &lt;/script&gt;
&lt;/head&gt;
&lt;body style="font-size:62.5%;"&gt;
  
&lt;div id=&quot;droppable&quot;&gt;Drop here&lt;/div&gt;
&lt;div id=&quot;draggable&quot;&gt;Drag me&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p></div>
</p><p></div>
    </div>
  </div>
  <div id="options">
    <h2 class="top-header">参数</h2>
    <ul class="options-list">
      
<li class="option" id="option-accept">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-accept">accept</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Selector, Function</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">'*'</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>接受所有符合选择器条件的draggable对象. 如果指定了一个函数, 该函数要求为页面上每个draggable对象(符合函数第一个条件的对象)提供一个过滤器.如果要这些元素被dropable接受,该函数需要返回true.</p>
    
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>accept</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ accept: '.special' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>accept</code>参数.
</dt>
<dd>
<pre><code>//获取
var accept = $('.selector').droppable('option', 'accept');
//设置
$('.selector').droppable('option', 'accept', '.special');</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-activeClass">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-activeClass">activeClass</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">String</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">false</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>如果指定了该参数,在被允许的draggable对象填充时,droppable会被添加上指定的样式.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>activeClass</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ activeClass: '.ui-state-highlight' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>activeClass</code>参数.
</dt>
<dd>
<pre><code>//获取
var activeClass = $('.selector').droppable('option', 'activeClass');
//设置
$('.selector').droppable('option', 'activeClass', '.ui-state-highlight');</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-addClasses">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-addClasses">addClasses</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Boolean</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">true</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>如果设置为false, 可以防止<code>ui-droppable</code>类在进行时添加. 这可能会使在初始化数百个元素执行<code>.droppable()</code>时使性能得到理想的优化.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>addClasses</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ addClasses: false });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>addClasses</code>参数.
</dt>
<dd>
<pre><code>//获取
var addClasses = $('.selector').droppable('option', 'addClasses');
//设置
$('.selector').droppable('option', 'addClasses', false);</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-greedy">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-greedy">greedy</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">Boolean</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">false</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>如果设置为true,将在嵌套的droppable对象中组织事件的传播.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>greedy</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ greedy: true });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>greedy</code>参数.
</dt>
<dd>
<pre><code>//获取
var greedy = $('.selector').droppable('option', 'greedy');
//设置
$('.selector').droppable('option', 'greedy', true);</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-hoverClass">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-hoverClass">hoverClass</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">String</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">false</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>如果设置了该参数,将在一个被允许的draggable对象悬停在droppable对象上时向droppable对象添加一个指定的样式.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>hoverClass</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ hoverClass: 'drophover' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>hoverClass</code>参数.
</dt>
<dd>
<pre><code>//获取
var hoverClass = $('.selector').droppable('option', 'hoverClass');
//设置
$('.selector').droppable('option', 'hoverClass', 'drophover');</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-scope">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-scope">scope</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">String</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">'default'</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>用来设置draggle对象和droppable对象的组, 除了droppable中的accept属性指定的元素外,和droppable对象相同组的draggable对象也被允许添加到droppable对象中.</p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>scope</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ scope: 'tasks' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>scope</code>参数.
</dt>
<dd>
<pre><code>//获取
var scope = $('.selector').droppable('option', 'scope');
//设置
$('.selector').droppable('option', 'scope', 'tasks');</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="option" id="option-tolerance">
  <div class="option-header">
    <h3 class="option-name"><a href="#option-tolerance">tolerance</a></h3>
    <dl>
      <dt class="option-type-label">类型:</dt>
        <dd class="option-type">String</dd>
      
      <dt class="option-default-label">默认值:</dt>
        <dd class="option-default">'intersect'</dd>
      
    </dl>
  </div>
  <div class="option-description">
    <p>指定使用那种模式来测试一个draggable"经过"一个droppable对象. 允许使用的值: 'fit', 'intersect', 'pointer', 'touch'.
</p>
<ul>
<li><b>fit</b>: draggable 完全重叠到droppable</li>
<li><b>intersect</b>: draggable 和droppable至少重叠50%</li>
<li><b>pointer</b>: 鼠标重叠到droppable</li>
<li><b>touch</b>: draggable和droppable的任意重叠</li>
</ul>
<p></p>
  </div>
  <div class="option-examples">
    <h4>代码示例</h4>
    <dl class="option-examples-list">
    
<dt>
  使用指定的<code>tolerance</code>参数初始化一个droppable.
</dt>
<dd>
<pre><code>$('.selector').droppable({ tolerance: 'fit' });</code></pre>
</dd>

    
<dt>
  在初始化后设置或者获取<code>tolerance</code>参数.
</dt>
<dd>
<pre><code>//获取
var tolerance = $('.selector').droppable('option', 'tolerance');
//设置
$('.selector').droppable('option', 'tolerance', 'fit');</code></pre>
</dd>

    </dl>
  </div>
</li>

    </ul>
  </div>
  <div id="events">
    <h2 class="top-header">事件</h2>
    <ul class="events-list">
      
<li class="event" id="event-activate">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-activate">activate</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">dropactivate</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件会在任何允许的draggable对象开始拖动时触发. 它可以用来在你想让droppable对象在可以被填充的时"亮起来"的时候.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>activate</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').droppable({
   activate: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>dropactivate</code>类型来绑定<code>activate</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('dropactivate', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-deactivate">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-deactivate">deactivate</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">dropdeactivate</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>此事件会在任何允许的draggable对象停止拖动时触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>deactivate</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').droppable({
   deactivate: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>dropdeactivate</code>类型来绑定<code>deactivate</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('dropdeactivate', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-over">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-over">over</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">dropover</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>此事件会在一个允许的draggable对象"经过"(根据tolerance参数的定义判断)这个droppable对象时触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>over</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').droppable({
   over: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>dropover</code>类型来绑定<code>over</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('dropover', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-out">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-out">out</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">dropout</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>此时间会在一个允许的draggable对象离开(根据tolerance参数的定义判断)这个droppable对象时触发.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>out</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').droppable({
   out: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>dropout</code>类型来绑定<code>out</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('dropout', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>


<li class="event" id="event-drop">
  <div class="event-header">
    <h3 class="event-name"><a href="#event-drop">drop</a></h3>
    <dl>
      <dt class="event-type-label">类型:</dt>
        <dd class="event-type">drop</dd>
    </dl>
  </div>
  <div class="event-description">
    <p>这个事件会在一个允许的draggable对象填充进这个droppable对象时触发. 回调函数中, $(this) 表示被填充的droppable对象.
ui.draggable 表示draggable对象.</p>
  </div>
  <div class="event-examples">
    <h4>代码示例</h4>
    <dl class="event-examples-list">
    
<dt>
  提供一个回调函数对<code>drop</code>事件进行操作.
</dt>
<dd>
<pre><code>$('.selector').droppable({
   drop: function(event, ui) { ... }
});</code></pre>
</dd>

    
<dt>
  使用<code>drop</code>类型来绑定<code>drop</code>事件.
</dt>
<dd>
<pre><code>$('.selector').bind('drop', function(event, ui) {
  ...
});</code></pre>
</dd>

    </dl>
  </div>
</li>

    </ul>
  </div>
  <div id="methods">
    <h2 class="top-header">方法</h2>
    <ul class="methods-list">
      
<li class="method" id="method-destroy">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.droppable( 'destroy' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>完全移除droppable功能. 这将使元素返回到之前的初始化状态.</p>
  </div>
</li>


<li class="method" id="method-disable">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-disable">disable</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.droppable( 'disable' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>关闭droppable.</p>
  </div>
</li>


<li class="method" id="method-enable">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-enable">enable</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.droppable( 'enable' )</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>打开droppable.</p>
  </div>
</li>


<li class="method" id="method-option">
  <div class="method-header">
    <h3 class="method-name"><a href="#method-option">option</a></h3>
    <dl>
      <dt class="method-signature-label">方法签名:</dt>
        <dd class="method-signature">.droppable( 'option', optionName
, <span class="optional">[</span>value<span class="optional">] </span>)</dd>
    </dl>
  </div>
  <div class="method-description">
    <p>获取或者设置droppable参数. 如果没有提供参数值则是获取.</p>
  </div>
</li>


    </ul>
  </div>
  <div id="theming">
    <h2 class="top-header">主题</h2>
    <p>jQuery UI Droppable插件使用jQuery UI CSS 框架的外观和风格，包括颜色和背景纹理.我们建议您使用ThemeRoller工具来创建和下载的自定义主题，很容易建立和维护.
</p>
  <p>如果有更深层次的个性化需要，有特定类别的工具ui.droppable.css样式可供参考，可以修改这些参考。这些课程是下面以高亮和粗体显示的。
</p>
    
  <h3>jQuery UI CSS Framework classes示例</h3>
  &lt;div class=&quot;<strong>ui-droppable</strong>&quot;&gt;&lt;/div&gt;
  <p class="theme-note">
    <strong>
      Note: 注：这是一个示例droppable插件所产生的标记,而不是你应该使用的标记.创建一个droppable唯一需要的标记是 &lt;div&gt;&lt;/div&gt;.
    </strong>
  </p>

  </div>
</div>

</p><!-- 
Pre-expand include size: 27586 bytes
Post-expand include size: 45489 bytes
Template argument size: 25247 bytes
Maximum: 2097152 bytes
-->

<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3064-1!1!0!!en!2 and timestamp 20090303120114 -->


						<!-- end content -->
		</div>
	</div>
		</div>
				</div><!-- /#primaryContent -->				
			</div><!-- /#content -->
	</div><!-- /#siteContain -->	
	</body>
<!-- Cached 20090303115837 -->
</html>
